arm: provide add_sized()
authorDavid Vrabel <david.vrabel@citrix.com>
Wed, 13 May 2015 13:01:25 +0000 (15:01 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 13 May 2015 13:01:25 +0000 (15:01 +0200)
commit890674d13feb4a270aa112ca452dcf62fdd53f34
tree15fa8b5f18f4ec5adbbef8d6788505aa0081cfe4
parent3c694aec08dda782d9c866e599b848dff86f474f
arm: provide add_sized()

add_sized(ptr, inc) adds inc to the value at ptr using only the correct
size of loads and stores for the type of *ptr.  The add is /not/ atomic.

This is needed for ticket locks to ensure the increment of the head ticket
does not affect the tail ticket.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/include/asm-arm/atomic.h